using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
namespace eTMS.DAO
{
    /********************************BEGIN SinhVienHocKyDAO****************************************/
    ///<summary>
    /// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
    /// <para>Date:10/08/2010 58:03:30</para>
    /// <para>Class Name: SinhVienHocKyDAO</para>
    /// <para>Description: Class access to table SinhVienHocKy in database. Class for coder code here</para>
    ///</summary>


    public partial class SinhVienHocKyDAO
    {
        public DataSet SelectAllDSByHocKy_IDNamHoc_IDListSinhVien(int HocKy_ID, int NamHoc_ID, List<int> lsSinhVien_ID)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText = "SELECT * FROM SinhVienHocKy WHERE SinhVienHocKy.HocKy_ID=" + HocKy_ID.ToString() + " AND NamHoc_ID=" + NamHoc_ID.ToString() + " AND SinhVien_ID IN(" + string.Join(",", lsSinhVien_ID.ConvertAll<string>(Convert.ToString).ToArray()) + ")";
            return this.SelectDS(cmd);
        }
        //public bool SaveListSinhVienHocKy(List<SinhVienHocKyEntity> list)
        //{
        //    IDbCommand cmd = this.CreateCommand();
        //    cmd.CommandText = "INSERT INTO [SinhVienHocKy]([SinhVien_ID],[HocKy_ID],[NamHoc_ID],[DiemRenLuyen],[DiemTongKet],[MaXepLoaiTongKet],[ThangDanhGia_ID],[XepLoaiRenLuyen_ID],[NamThu]) VALUES ";
        //}
        //private string GetListInsertValues(List<SinhVienHocKyEntity> list)
        //{
        //    List<string> ls = new List<string>();
        //    foreach (SinhVienHocKyEntity o in list)
        //    {

        //    }
        //}
        //private string GetInsertValue(SinhVienHocKyEntity o)
        //{
        //    StringBuilder strmBuilder = new StringBuilder();
        //    strmBuilder.Append(o.SinhVien_ID.ToString() + ",");
        //    strmBuilder.Append(o.HocKy_ID.ToString() + ",");
        //    strmBuilder.Append(o.NamHoc_ID.ToString() + ",");
        //    strmBuilder.Append(o.DiemRenLuyen.ToString() + ",");
        //    strmBuilder.Append(o.DiemTongKet.ToString() + ",");
        //    strmBuilder.Append("'" + o.MaXepLoaiTongKet.ToString() + "',");
        //    strmBuilder.Append(o.ThangDanhGia_ID.ToString() + ",");
        //    return strmBuilder.ToString();
        //}
    }
    /*****************************************************************************************************/
    /**********************************END SinhVienHocKyDAO*****************************************/
    /*****************************************************************************************************/
}

